# import logging
# import sys

# logging.basicConfig(
#     level=logging.INFO,
#     format='%(asctime)s - %(levelname)s - %(message)s',
#     # filename='ui.log'
#     # stream=sys.stdout
# )
# logger = logging.getLogger(__name__)


# 在 tools.py 中确保 logger 配置正确
# import logging

# # 配置 logger 输出到控制台
# logging.basicConfig(
#     level=logging.INFO,
#     format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
# )

# logger = logging.getLogger(__name__)

import logging

# 在 tools.py 中配置 logger
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
formatter = logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")
handler.setFormatter(formatter)
logger.addHandler(handler)
